<template>
    <el-button v-bind="$attrs" v-on="evets">
        <!-- :loading="disabled" -->
        {{$attrs.content}}
        <!-- <slot></slot> -->
    </el-button>
</template>
<script>
export default {
    data () {
        return {
            timer: null
        }
    },
    computed: {
        evets () {
            if (this.$listeners.click) {
                this.$listeners.click = () => {
                    if (!this.timer) {
                        this.$emit('click')
                        this.timer = setTimeout(() => {
                            this.timer = null;
                        }, this.$attrs.throat || 1000);
                    }
                }
            }
            return this.$listeners;
        },
        disabled () {
            if (this.timer) {
                return true;
            } else {
                return false;
            }
        }
    },

}
</script>